///////////////////////////////////////////////////////////////////////////////
//
// TestArgumentPrinter.cxx
// Simply prints out the arguments it receives in the order it receives them.
// Used to test to make sure KeepAlive is passing arguments. This program also
// lingers for about 7 seconds to make sure KeepAlive isn't trying to constantly
// re-create its process or something.
//
// Used only for testing! Don't run this on the Kiosk, it isn't necessary.
//
// 12 December 2011
// Alex Kersten
//
////////////////////////////////////////////////////////////////////////////////


#include "stdafx.h"
#include <iostream>
#include <Windows.h>

using namespace std;

int _tmain(int argc, TCHAR** argv) {
	cout << "About to print arguments and stay alive for 7 seconds." << endl;
	cout << "This will test both the argument-passing and general keep-alive-iness of the KeepAlive program." << endl;
	cout << "----------" << endl;
	cout << "Received " << (argc - 1) << " arguments." << endl;

	if (argc > 1) {
		cout << "Arguments were:" << endl;

		for (int i = 0; i < argc - 1; i++) {
			wcout << argv[i + 1] << endl;
		}
	}

	int seconds = 7;

	while (seconds > 0) {
		cout << "Exiting in " << seconds-- << " seconds..." << endl;
		Sleep(1000);
	}

	return 0;
}
